<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Donxon SDK Docs</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Donxon SDK</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Data_Structures">Data Structures</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Methods">Methods</a></li>
</ul>


<h2>Classes</h2>
<ul class="nowrap">
  <li><a href="../classes/Debug.html">Debug</a></li>
  <li><a href="../classes/StringBuffer.html">StringBuffer</a></li>
  <li><strong>Hook</strong></li>
  <li><a href="../classes/System.UTF8.html">System.UTF8</a></li>
  <li><a href="../classes/Common.Color.html">Common.Color</a></li>
  <li><a href="../classes/Common.Vector2D.html">Common.Vector2D</a></li>
  <li><a href="../classes/Common.Vector.html">Common.Vector</a></li>
  <li><a href="../classes/Common.NetMessage.html">Common.NetMessage</a></li>
  <li><a href="../classes/Common.TextMenu.html">Common.TextMenu</a></li>
  <li><a href="../classes/Common.ScreenFade.html">Common.ScreenFade</a></li>
  <li><a href="../classes/Common.HUDText.html">Common.HUDText</a></li>
  <li><a href="../classes/Game.NetMessage.html">Game.NetMessage</a></li>
  <li><a href="../classes/Game.TextMenu.html">Game.TextMenu</a></li>
  <li><a href="../classes/Game.ScreenFade.html">Game.ScreenFade</a></li>
  <li><a href="../classes/Game.BarTime.html">Game.BarTime</a></li>
  <li><a href="../classes/UI.Rectangle.html">UI.Rectangle</a></li>
  <li><a href="../classes/UI.ProgressBar.html">UI.ProgressBar</a></li>
  <li><a href="../classes/UI.TextMenu.html">UI.TextMenu</a></li>
  <li><a href="../classes/UI.ScreenFade.html">UI.ScreenFade</a></li>
  <li><a href="../classes/UI.BarTime.html">UI.BarTime</a></li>
</ul>
<h2>Globals</h2>
<ul class="nowrap">
  <li><a href="../globals/Properties.html">Properties</a></li>
  <li><a href="../globals/Functions.html">Functions</a></li>
  <li><a href="../globals/Classes.html">Classes</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
  <li><a href="../modules/System.html">System</a></li>
  <li><a href="../modules/Common.html">Common</a></li>
  <li><a href="../modules/Game.html">Game</a></li>
  <li><a href="../modules/UI.html">UI</a></li>
</ul>
<h2>Topics</h2>
<ul class="">
  <li><a href="../topics/changelog.md.html">changelog</a></li>
  <li><a href="../topics/credit.md.html">credit</a></li>
  <li><a href="../topics/license.html">license</a></li>
</ul>
<h2>Examples</h2>
<ul class="nowrap">
  <li><a href="../examples/bartime.game.lua.html">bartime.game.lua</a></li>
  <li><a href="../examples/bartime.ui.lua.html">bartime.ui.lua</a></li>
  <li><a href="../examples/deltatiming.game.lua.html">deltatiming.game.lua</a></li>
  <li><a href="../examples/deltatiming.ui.lua.html">deltatiming.ui.lua</a></li>
  <li><a href="../examples/hook.game.lua.html">hook.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.common.lua.html">netmsg.simple.common.lua</a></li>
  <li><a href="../examples/netmsg.simple.game.lua.html">netmsg.simple.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.ui.lua.html">netmsg.simple.ui.lua</a></li>
  <li><a href="../examples/progressbar.ui.lua.html">progressbar.ui.lua</a></li>
  <li><a href="../examples/rectangle.ui.lua.html">rectangle.ui.lua</a></li>
  <li><a href="../examples/screenfade.game.lua.html">screenfade.game.lua</a></li>
  <li><a href="../examples/screenfade.ui.lua.html">screenfade.ui.lua</a></li>
  <li><a href="../examples/stringbuffer.lua.html">stringbuffer.lua</a></li>
  <li><a href="../examples/textmenu.simple.game.lua.html">textmenu.simple.game.lua</a></li>
  <li><a href="../examples/utf8.lua.html">utf8.lua</a></li>
  <li><a href="../examples/vector.2d.lua.html">vector.2d.lua</a></li>
  <li><a href="../examples/vector.3d.lua.html">vector.3d.lua</a></li>
</ul>

</div>

<div id="content">

<h1>Class <code>Hook</code></h1>
<p>Hook Management class.</p>
<p> Creating multiple hooks become more easier.</p>


<h2><a href="#Data_Structures">Data Structures</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#.hookLink">.hookLink</a></td>
	<td class="summary">The hook doubly-linked list.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#.hookIndexPage">.hookIndexPage</a></td>
	<td class="summary">The hook index page table.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#.hookContainer">.hookContainer</a></td>
	<td class="summary">The hook container table.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#.hookContainerMetatable">.hookContainerMetatable</a></td>
	<td class="summary">The hook container's metatable.</td>
	</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#Hook.RETURN">Hook.RETURN</a></td>
	<td class="summary">Hook function return codes.</td>
	</tr>
</table>
<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#Hook:Create">Hook:Create (base[, hookNameComparator[, functionSelfOverride=false]])</a></td>
	<td class="summary">Creates a hook container.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Hook:Remove">Hook:Remove (hooks, func)</a></td>
	<td class="summary">Removes a hook.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Hook:RemoveAll">Hook:RemoveAll (hooks)</a></td>
	<td class="summary">Removes all hooks.</td>
	</tr>
</table>

<br/>
<br/>


    <h2 class="section-header "><a name="Data_Structures"></a>Data Structures</h2>

    <dl class="function">
    <dt>
    <a name = ".hookLink"></a>
    <strong>.hookLink</strong>
    </dt>
    <dd>
    The hook doubly-linked list.


    <ul>
        <li><span class="parameter">_previous</span>
            <span class="types"><a class="type" href="../classes/Hook.html#.hookLink">.hookLink</a></span>
         The previous link.
        </li>
        <li><span class="parameter">_current</span>
            <span class="types"><span class="type">function</span></span>
         The hook function.
        </li>
        <li><span class="parameter">_next</span>
            <span class="types"><a class="type" href="../classes/Hook.html#.hookLink">.hookLink</a></span>
         The next link.
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".hookIndexPage"></a>
    <strong>.hookIndexPage</strong>
    </dt>
    <dd>
    The hook index page table.


    <ul>
        <li><span class="parameter">_container</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The hook container parent table.
        </li>
        <li><span class="parameter">_base</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The base hook class.
        </li>
        <li><span class="parameter">_name</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The hook name.
        </li>
        <li><span class="parameter">_first</span>
            <span class="types"><a class="type" href="../classes/Hook.html#.hookLink">.hookLink</a></span>
         The first hook.
        </li>
        <li><span class="parameter">_last</span>
            <span class="types"><a class="type" href="../classes/Hook.html#.hookLink">.hookLink</a></span>
         The last hook.
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".hookContainer"></a>
    <strong>.hookContainer</strong>
    </dt>
    <dd>
    The hook container table.


    <ul>
        <li><span class="parameter">_base</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The base hook class.
        </li>
        <li><span class="parameter">_hooks</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">{[string]=.hookIndexPage,...}</a></span>
         The hook index pages.
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".hookContainerMetatable"></a>
    <strong>.hookContainerMetatable</strong>
    </dt>
    <dd>
    The hook container's metatable.


    <ul>
        <li><span class="parameter">__hookNameComparator</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string[]</a> or <span class="type">function</span></span>
         The comparator of hook method name (Lua Regex | Hook name list | Comparator function). (<em>default</em> "[Oo]n%u.*")
         (<em>optional</em>)
        </li>
        <li><span class="parameter">__functionSelfOverride</span>
            <span class="types"><span class="type">bool</span></span>
         Sets hook table as <code>self</code> when accessing base's functions.
         (<em>default</em> false)
        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Tables"></a>Tables</h2>

    <dl class="function">
    <dt>
    <a name = "Hook.RETURN"></a>
    <strong>Hook.RETURN</strong>
    </dt>
    <dd>
    Hook function return codes.


    <h3>Fields:</h3>
    <ul>
        <li><span class="parameter">CONTINUE</span>
        Returned when a hook function has not handled the call.
        </li>
        <li><span class="parameter">HANDLED</span>
        Returned when a hook function has handled the call.
        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Methods"></a>Methods</h2>

    <dl class="function">
    <dt>
    <a name = "Hook:Create"></a>
    <strong>Hook:Create (base[, hookNameComparator[, functionSelfOverride=false]])</strong>
    </dt>
    <dd>
    Creates a hook container.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">base</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The base hook class.
        </li>
        <li><span class="parameter">hookNameComparator</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a>, <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string[]</a> or <span class="type">function</span></span>
         The comparator of hook method name (Lua Regex | Hook name list | Comparator function). (<em>default</em> "[Oo]n%u.*")
         (<em>optional</em>)
        </li>
        <li><span class="parameter">functionSelfOverride</span>
            <span class="types"><span class="type">bool</span></span>
         Sets hook table as <code>self</code> when accessing base's functions.
         (<em>default</em> false)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Hook.html#.hookContainer">.hookContainer</a></span>
        A hook container.
    </ol>




</dd>
    <dt>
    <a name = "Hook:Remove"></a>
    <strong>Hook:Remove (hooks, func)</strong>
    </dt>
    <dd>
    Removes a hook.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">hooks</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The hook name.
        </li>
        <li><span class="parameter">func</span>
            <span class="types"><span class="type">function</span> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The hook function reference to remove.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">boolean</span></span>
        Returns <code>true</code> if succeed. Otherwise, returns <code>false</code>.
    </ol>




</dd>
    <dt>
    <a name = "Hook:RemoveAll"></a>
    <strong>Hook:RemoveAll (hooks)</strong>
    </dt>
    <dd>
    Removes all hooks.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">hooks</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The hook name.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">boolean</span></span>
        Returns <code>true</code> if succeed.
    </ol>




</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-06-15 21:15:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
